<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>个人中心</title>
		<meta name="format-detection" content="telephone=yes" />
		<!-- 引入样式 -->
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@beta/lib/index.css">
		<!-- 引入组件 -->
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
		<script src="https://cdn.jsdelivr.net/npm/vant@beta/lib/vant.min.js"></script>
		<script type="application/javascript" src="../../js/flexible.debug.js"></script>
		<script type="application/javascript" src="../../js/flexible_css.debug.js"></script>
		<script type="text/javascript" src="../../js/jquery-1.10.1.min.js"></script>
		<script type="text/javascript" src="../../js/querystring.min.js"></script>
		<script type="text/javascript" src="../..//js/cfg.js"></script>
		<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
		<link rel="stylesheet" href="../../css/layout.css">
	</head>
	<body>
		<div id="app" v-cloak>
			<div class="top userTop pad-tb60 width100 height252">
				<div class="mg-t30 mg-b40 content displayFlex">
					<p class="width128 height128 radious50">
						<img v-if="userPhto==''" src="../../img/defaultUser.png" alt="用户头像" class="width100p height100p">
						<img v-if="userPhto" :src="userPhto" alt="用户头像" class="width100p height100p">
					</p>
					<p class="mg-l30 colorfff">
						<span class="font38 displayblock textLeft letterSpacing1">用户昵称</span>
						<span class="font34 mg-t27 displayblock textLeft letterSpacing1">{{userinfo.user_id}}</span>
					</p>
				</div>
			</div>
			<div class="midell mg-t20 backgroundcolorfff">
				<div class="height108 lineHeight108 letterSpacing1 displayFlex borderbottomf0 pad-lr24">
					<span class="color333 flex1 font30">我的订单</span>
					<span class="color999 flex1 textRight font28 userIcon pad-r30" @click="goLink('order.html?ordertype=0')">查看全部</span>
				</div>
				<div class="pad-tb50 displayFlex ">
					<p class="flex1" @click="goLink('order.html?ordertype=1')">
						<span class="width48 height50 displayTable orderspan">
							<img src="../../img/icondaifukuan.png" alt="代付款" class="width100p height100p">
							<em v-if="userinfo.order_status_0!=0" class="tipsInfo">{{userinfo.order_status_0}}</em>
						</span>
						<span class="displayTable font26 color515151 letterSpacing1 mg-t20">待付款</span>
					</p>
					<p class="flex1" @click="goLink('order.html?ordertype=2')">
						<span class="width48 height50 displayTable orderspan">
							<img src="../../img/icondaifahuo.png" alt="待发货" class="width100p height100p">
							<em v-if="userinfo.order_status_1!=0" class="tipsInfo">{{userinfo.order_status_1}}</em>
						</span>
						<span class="displayTable font26 color515151 letterSpacing1 mg-t20">待发货</span>
					</p>
					<p class="flex1" @click="goLink('order.html?ordertype=3')">
						<span class="width48 height50 displayTable orderspan">
							<img src="../../img/icondaishouhuo.png" alt="待收货" class="width100p height100p">
							<em v-if="userinfo.order_status_2!=0" class="tipsInfo">{{userinfo.order_status_2}}</em>
						</span>
						<span class="displayTable font26 color515151 letterSpacing1 mg-t20">待收货</span>
					</p>
					<p class="flex1" @click="goLink('order.html?ordertype=4')">
						<span class="width48 height50 displayTable orderspan">
							<img src="../../img/iconjiaoyiwancheng.png" alt="待评价" class="width100p height100p">
							<em v-if="userinfo.order_status_4!=0" class="tipsInfo">{{userinfo.order_status_4}}</em>
						</span>
						<span class="displayTable font26 color515151 letterSpacing1 mg-t20">交易完成</span>
					</p>
					<p class="flex1" @click="goLink('order.html?ordertype=5')">
						<span class="width48 height50 displayTable orderspan">
							<img src="../../img/iconshouhou.png" alt="已取消" class="width100p height100p">
							<em v-if="userinfo.order_status_5!=0" class="tipsInfo">{{userinfo.order_status_5}}</em>
						</span>
						<span class="displayTable font26 color515151 letterSpacing1 mg-t20">已取消</span>
					</p>
				</div>
			</div>
			<div class="userList mg-t20 backgroundcolorfff pad-lr24">
				<div class="height108 lineHeight108 letterSpacing1 displayFlex borderbottomf0" @click="goLink('null.html')">
					<span class="color333 font30 userIcon"><em class="icon mg-r12 width30"><img src="../../img/iconactivegouwuche.png"
							 alt="购物车" class="width100p"></em>购物车</span>
				</div>
				<div class="height108 lineHeight108 letterSpacing1 displayFlex borderbottomf0" @click="goLink('../address.html')">
					<span class="color333 font30 userIcon"><em class="icon mg-r12 width30"><img src="../../img/position.png" alt="地址管理"
							 class="width100p"></em>地址管理</span>
				</div>
				<!-- 调用产品详情 -->
				<div class="height108 lineHeight108 letterSpacing1 displayFlex borderbottomf0" @click="wxshare">
					<span class="color333 font30 userIcon"><em class="icon mg-r12 width30"><img src="../../img/iconyaoqing.png" alt="邀请团友"
							 class="width100p"></em>邀请好友</span>
				</div>
				<div class="height108 lineHeight108 letterSpacing1 displayFlex borderbottomf0" 
				 :tell="15223372903">
					<a class="color333 font30 userIcon displayFlex width100" :href="'tel:' + servicetel"><em class="icon mg-r12 width30"><img src="../../img/icontell.png" alt="联系我们"
							 class="width100p"></em>联系我们</a>
				</div>
				<div class="height108 lineHeight108 letterSpacing1 displayFlex borderbottomf0" @click="goLink()">
					<span class="color333 font30 userIcon"><em class="icon mg-r12 width30"><img src="../../img/iconabout.png" alt="关于我们"
							 class="width100p"></em>关于我们</span>
				</div>
			</div>
			<div class=" displayFlex mg-t20 backgroundcolorfff pad-tb12">
				<p class="flex1" @click="goLink('../index.html')">
					<span class="width41 height44  displayTable"><img src="../../img/iconzaixian.png" alt="在线购买" class="width100p height100p"></span>
					<span class="displayTable font20 colorbcbcbc letterSpacing1 mg-t12">在线购买</span>
				</p>
				<p class="flex1" @click="goLink('null.html')">
					<span class="width41 height44  displayTable"><img src="../../img/icongouwuche.png" alt="购物车" class="width100p height100p"></span>
					<span class="displayTable font20 colorbcbcbc letterSpacing1 mg-t12">购物车</span>
				</p>
				<p class="flex1">
					<span class="width41 height44 displayTable"><img src="../../img/iconactionuser.png" alt="个人中心" class="width100p height100p"></span>
					<span class="displayTable font20 colorf72929 letterSpacing1 mg-t12 ">个人中心</span>
				</p>
			</div>
		</div>
		<script>
			var vant = window.vanttrue;
			var qsd=querystring.parse();
			var cfg = new AppCfg().init({
				isDebug: false,
			});
			var amount = querystring.parse().amount;
			// Vue.use(vant);
			new Vue({
				el: '#app',
				data: {
					userPhto: '',
					servicetel:'15223372903',
					userinfo:''
				},
				created: function() {
					this.userInfo();
				},
				mounted:function(){
					// this.wxshare()
				},
				methods: {
					userInfo:function(){
						var that=this;
						cfg.majaxAction("queryOcobUserByUserId", '', function(res) {
							if(res.data){
								that.userinfo=res.data;
							}else{
								that.userinfo=''
							}
						});
					},
					// 微信分享配置
					wxshare:function(){
						var that=this;
						console.log(that.userid)
						var url=window.location.href;
						var shareurl=url.split('?')[0];
						alert(shareurl)
						var param={
							url:'http://test.newzqxq.com/yichengyihe/html/index.html'
						}
						cfg.majaxAction("wxShare",param, function(res) {
							if(res.code == 0){
								wx.config ({
								    debug : true,
								    appId : res.data.appid,
								    timestamp :res.data.timestamp,
								    nonceStr : res.data.noncestr,
								    signature : res.data.signature,
								    jsApiList : [
								        // 所有要调用的 API 都要加到这个列表中
								        'onMenuShareTimeline',
								        'onMenuShareAppMessage',
								        'onMenuShareQQ',
								        'onMenuShareWeibo',
								        'onMenuShareQZone'
								    ]
								});
								wx.ready (function () {
								    // 微信分享的数据
								    var shareData = {
								        "imgUrl" : "",
								        "link" : "http://test.newzqxq.com/yichengyihe/html/index.html",
								        "desc" : "一城一盒拼团分享",
								        "title" :"一城一盒",
								        success : function (res) {
								            // 分享成功可以做相应的数据处理
											console.log(res)
								        }
								    };
								    //分享微信朋友圈
								    wx.onMenuShareTimeline (shareData);
								    //分享给朋友
									wx.onMenuShareAppMessage(shareData)
								    //分享到qq
								    wx.onMenuShareQQ (shareData);
								    //分享到微博
								    wx.onMenuShareWeibo (shareData);
								    //分享到qq空间
								    wx.onMenuShareQZone(shareData);
								});
							}
						});
					},
					goLink: function(val) {
						// alert(val)
						window.location.href = val;
					},
					callPhone(phoneNumber) {
						window.location.href = 'tel://' + phoneNumber
					},
				},
				filters: {

				}
			})
		</script>
	</body>
</html>
